﻿using Datav.Design.Core;
using Datav.Design.Datas.Pocos;
using System.Collections.Generic;
using WorldDesign.Datas;
using Zdap.Common;
using Zdap.XCode;

namespace Datav.Design
{
    /// <summary>
    /// 
    /// </summary>
    public class ComsModelDto //: TreeBase
    {
        /// <summary>
        /// 
        /// </summary>
        public long Id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public long ParentId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string? Name { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string? Paths { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string? Type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public long ProjectId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public long GroupId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string? Alias { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string? Icon { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string? Img { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool Locked { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int Sort { get; set; }


        public int Tag { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public bool Hided { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool Selected { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool Hovered { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool Renameing { get; set; }


        /// <summary>
        /// 
        /// </summary>
        [JsonField("Attr")] // 明确指定存储字段
        public dynamic? Attr { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonField("Config")] // 明确指定存储字段
        public dynamic? Config { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [JsonField("Actions")] // 明确指定存储字段
        public dynamic? Actions { get; set; }

        /// <summary>
        /// 动态数据对象（前端/逻辑层使用）
        /// </summary>
        [JsonField("Scaling")] // 明确指定存储字段
        public dynamic? Scaling { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonField("Events")] // 明确指定存储字段
        public dynamic? Events { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonField("Apis")] // 明确指定存储字段
        public dynamic? Apis { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [JsonField("ApiData")] // 明确指定存储字段
        public dynamic? ApiData { get; set; }

        ///// <summary>
        /// 存储字段数据源
        ///// </summary>
        //[JsonField("ApiData")] 
        //public SourceDto ApiData { get; set; }

        /// <summary>
        /// 自层级结构
        /// </summary>
        public IEnumerable<ComsModelDto> Children { get; set; } = Enumerable.Empty<ComsModelDto>();

    }

}